package com.example.kliven.because.activity;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.NetworkImageView;
import com.example.kliven.because.R;
import com.example.kliven.because.Singleton.VolleySingleton;
import com.example.kliven.because.adapter.DetailAdapter;
import com.example.kliven.because.intentbean.NetNearbyBean;
import com.google.gson.Gson;

import java.util.ArrayList;
import java.util.List;

public class NearbyDetailActivity extends Activity {

    private Context context;
    private ListView listView_Detail;
    public static NetNearbyBean netNearbyBeans;
    private List<NetNearbyBean> data;

    private NetworkImageView net_img_head;
    private NetworkImageView net_img;
    private TextView tv_username;
    private TextView tv_lever;
    private TextView tv_share_count;
    private TextView tv_commend_count;
    private TextView tv_pinglun1, tv_pinglun2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail);

        listView_Detail = (ListView) findViewById(R.id.list_view_detail);
        View view_header = LayoutInflater.from(this).inflate(R.layout.item_listview_head_detail, null);
        listView_Detail.addHeaderView(view_header);
        initView();
        int position = getPosition();
//        tv_username.setText(data.get(position).getData().getShop_and_url_item().get(position).getShop_name());
//        tv_lever.setText(data.get(position).getData().getShop_and_url_item().get(position).getSharecount());
    }

    private int getPosition() {
        Bundle getB = getIntent().getBundleExtra("nearbyBundle");
        return Integer.parseInt(getB.getString("p"));
    }

    private void initView() {
        net_img_head = (NetworkImageView) findViewById(R.id.net_img_head);
        net_img = (NetworkImageView) findViewById(R.id.net_img);
        tv_username = (TextView) findViewById(R.id.tv_username);
        tv_lever = (TextView) findViewById(R.id.tv_lever);
        tv_share_count = (TextView) findViewById(R.id.tv_share_count);
        tv_commend_count = (TextView) findViewById(R.id.tv_commend_count);
        tv_pinglun1 = (TextView) findViewById(R.id.tv_pinglun1);
        tv_pinglun2 = (TextView) findViewById(R.id.tv_pinglun2);

    }
}
